7acdbf2e61f0d734d22b5cbec27e11237ac0b6a0,restful/src/main/java/org/cloudifysource/rest/security/CustomPermissionEvaluator.java,CustomPermissionEvaluator,getUserRoles,#,377

Before Change


    private Collection<String> getUserRoles() {
    	Set<String> userRoles = new HashSet<String>();
    	
    	Authentication authentication = SecurityContextHolder.getContext().getAuthentication();
    	
    	if (authentication == null || authentication instanceof AnonymousAuthenticationToken) {
			throw new AccessDeniedException("Anonymous user is not supported");
    	}
		

After Change


     * @return A Collection of roles (authorities) the user is granted.
     */
    private Collection<String> getUserRoles() {
    	return getUserRoles(SecurityContextHolder.getContext().getAuthentication());
    }
    
    /**